package cn.xxd.service.impl;

import cn.xxd.dao.ContentDao;
import cn.xxd.entity.HomeContent;
import cn.xxd.entity.XxdItem;
import cn.xxd.service.ContentService;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

// 注册为 Dubbo 服务
@Service(version = "1.0.0", interfaceClass = ContentService.class)
public class ContentServiceImpl implements ContentService {
    /**
     * 根据id查询内容
     *
     * @param id
     * @return
     */
    @Autowired
    private ContentDao contentDao;

    @Override
    public List<HomeContent> find() {
        return contentDao.find();
    }

    @Override
    public List<XxdItem> findXxdActivitieItem(Integer activitieId) {
        return contentDao.findXxdActivitieItem(activitieId);
    }

    @Override
    public XxdItem findItemById(long id) {
        return contentDao.findItemById(id);
    }

    @Override
    public List<XxdItem> findHomeCartItem(Integer id) {
        return contentDao.findHomeCartItem(id);
    }

    @Override
    public List<XxdItem> getOneItemById(String id) {
        return contentDao.getOneItemById(id);
    }

    @Override
    public List<HomeContent> getContentListByCid(long cid) {
        return null;
    }
}
